<?php
class Companydata_Model_Companydata implements Companydata_Model_Mainable {
    
    private $action_handler;
    private $core_controller_csrftoken;
    
    public function main(array $variables = null){
        if(isset($variables['get']['[age'])){
            $this->action_handler = new Companydata_Model_Pagedecision;
            return $this->action_handler->main($variables);
        }
        else {
          $this->core_controller_csrftoken = new Core_Controller_Csrftoken;
          $this->action_handler = new Companydata_Data_Getcompanydata;
          $page['template'] = WEB_ROOT_FOLDER."companydata/views/companydata.php";
          $page['csrf_token'] = $this->core_controller_csrftoken->main($variables);
          $page['content'] = $this->action_handler->main($variables);
          return $page;
        }
    }
}
